﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Master.Master" CodeBehind="ACM_Calculate_TaxAmount.aspx.cs" Inherits="KPIS.GERP.GAMS.APP.App_UI.Forms.ACM_Calculate_TaxAmount" %>
<%@ Register src="../UserControls/DatePicker.ascx" tagname="DatePicker" tagprefix="uc1" %>
<asp:Content ID="Content2" runat="server" 
    contentplaceholderid="head">
    
    <title>รายการภาษีซื้อ/ขาย</title>
    <link href="../CssClass.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" src="../Scripts/DatePicker.js" type="text/jscript"></script>

</asp:Content>

<asp:Content ID="Body" runat="server" contentplaceholderid="ContentPlaceHolder1" >
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="Panel2" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Panel2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="Panel2" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            </AjaxSettings>
    </telerik:RadAjaxManager>
    <div class="DivBody" >
         <table  align = "center" >
                <tr align ="center">
                    <td align="right" width="150px">
                        เดือนที่คิดคำนวณ :
                    </td>
                    <td align="left" width="300px">
                        <telerik:RadComboBox ID="ddlBgmMonth" runat="server"
                            DataTextField="bgm_BgmMonth_Name" DataValueField="bgm_BgmMonth_Id"
                            Filter="Contains" Width="280px">
                        </telerik:RadComboBox>
                    </td>
                    <td align="right" width="150px">
                        ปีที่คิดคำนวณ :
                    </td>
                    <td align="left" width="300px">
                        <telerik:RadNumericTextBox ID="txtBgmYear" runat="server" MaxLength="4">
                            <NumberFormat DecimalDigits="0" GroupSeparator="" />
                        </telerik:RadNumericTextBox>
                    </td>
                </tr>
             
            </table>
        <div class="DivInfo" align="center">
            <asp:Button ID="cmdFilter" runat="server" Text="กรองข้อมูล" OnClick="cmdFilter_Click" />
        </div>
            
       
</div>
<asp:Panel ID="Panel1" runat="server">
        <table align ="center">
            <tr><asp:Label ID="Label4" runat="server"  Font-Bold="true" text="ภาษีซื้อและภาษีขาย" /></tr>
            <tr>
                
                <td>
                    <telerik:RadGrid ID="RadGridVersion" runat="server" AutoGenerateColumns="false"
                                    AllowMultiRowEdit="false" AllowMultiRowSelection="true" 
                                    Width="490px" Height="300px" AllowPaging="true" AllowFilteringByColumn="false"
                                    GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                                    GroupingSettings-GroupContinuedFormatString=""
                                    GroupingSettings-GroupContinuesFormatString=""
                                    GroupingSettings-GroupSplitFormat=""
                                    OnNeedDataSource="grdACMVersion_NeedDataSource" 
                                     align ="center">
                        <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" GroupLoadMode="Client" Width="100%"
                                        DataKeyNames="" NoMasterRecordsText="< ไม่มีข้อมูล >" GroupsDefaultExpanded="true">
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <Columns>
                                <%--<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="25px">
                                                </telerik:GridClientSelectColumn>--%>
                                <telerik:GridBoundColumn DataField="pay_seq" UniqueName="pay_seq" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="ref_no" UniqueName="ref_no"
                                                HeaderText="รหัสรายการ" 
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Width="100px"
                                                HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                               
                                <%--HeaderStyle-Width="370px"--%>
                                <telerik:GridBoundColumn DataField="pay_name"
                                                HeaderText="ชื่อรายการ"
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="pay_date" DataFormatString = "{0:D}"
                                                HeaderText="วันที่รายการ"
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="100px"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn DataField="amount" DataFormatString = "{0:n2}"
                                                HeaderText="จำนวนเงินคิดภาษี"
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="120px" 
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <%--<telerik:GridTemplateColumn HeaderText="แก้ไข" HeaderStyle-Font-Bold="true" HeaderStyle-Width="40" HeaderStyle-HorizontalAlign="Center" >
                                    <FilterTemplate>
                                    </FilterTemplate>
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnEdit" runat="server" CommandName="DataEdit" ImageUrl="~/App_UI/Images/Buttons/Edit.gif"  ToolTip="แก้ไขข้อมูลของเวอร์ชั่น" width="17"/>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="ลบ" HeaderStyle-Font-Bold="true" HeaderStyle-Width="35" HeaderStyle-HorizontalAlign="Center">
                                    <FilterTemplate>
                                    </FilterTemplate>
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnSave" runat="server" CommandName="Delete" ImageUrl="~/App_UI/Images/Buttons/Delete.gif"  ToolTip="ลบรายการเวอร์ชั่นที่เลือก" width="17" OnClientClick="javascript: return confirm('ต้องการลบรายการนี้หรือไม่?');"/>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>--%>
                            </Columns>
                            <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                                            FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                                            NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                                            PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                        </MasterTableView>
                        <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                                        GroupContinuedFormatString="" GroupContinuesFormatString="" 
                                                        GroupSplitFormat="" />
                        <ClientSettings EnableRowHoverStyle="True">
                            <Selecting AllowRowSelect="true" />
                            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                        </ClientSettings>
                    </telerik:RadGrid>
                </td>
                   
              <td>
           
            <table align ="center">
              <%--<tr><asp:Label ID="Label3" runat="server"  Font-Bold="true" text="" /></tr> --%>
            <tr>
                
                <td>
                   <telerik:RadGrid ID="RadGridVersion2" runat="server" AutoGenerateColumns="false"
                                    AllowMultiRowEdit="false" AllowMultiRowSelection="true" 
                                    Width="490px" Height="300px" AllowPaging="true" AllowFilteringByColumn="false"
                                    GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                                    GroupingSettings-GroupContinuedFormatString=""
                                    GroupingSettings-GroupContinuesFormatString=""
                                    GroupingSettings-GroupSplitFormat=""
                                    OnNeedDataSource="grdACMVersion_NeedDataSource" 
                                     align ="center">
                        <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" GroupLoadMode="Client" Width="100%"
                                        DataKeyNames="" NoMasterRecordsText="< ไม่มีข้อมูล >" GroupsDefaultExpanded="true">
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <Columns>
                                <%--<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="25px">
                                                </telerik:GridClientSelectColumn>--%>
                                <telerik:GridBoundColumn DataField="receive_seq" UniqueName="receive_seq" Visible="false">
                                </telerik:GridBoundColumn>
                               
                              
                               <telerik:GridBoundColumn DataField="ref_no"
                                                HeaderText="รหัสรายการ"
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="100px"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="remarks"
                                                HeaderText="ชื่อรายการ"
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="150px"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="receive_date" DataFormatString = "{0:D}"
                                                HeaderText="วันที่รายการ"
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="150px"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="vat_amount" DataFormatString = "{0:n2}"
                                                HeaderText="จำนวนเงินคิดภาษี"
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="150px"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                               <%-- <telerik:GridTemplateColumn HeaderText="แก้ไข" HeaderStyle-Font-Bold="true" HeaderStyle-Width="40" HeaderStyle-HorizontalAlign="Center" >
                                    <FilterTemplate>
                                    </FilterTemplate>
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnEdit" runat="server" CommandName="DataEdit" ImageUrl="~/App_UI/Images/Buttons/Edit.gif"  ToolTip="แก้ไขข้อมูลของเวอร์ชั่น" width="17"/>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="ลบ" HeaderStyle-Font-Bold="true" HeaderStyle-Width="35" HeaderStyle-HorizontalAlign="Center">
                                    <FilterTemplate>
                                    </FilterTemplate>
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnSave" runat="server" CommandName="Delete" ImageUrl="~/App_UI/Images/Buttons/Delete.gif"  ToolTip="ลบรายการเวอร์ชั่นที่เลือก" width="17" OnClientClick="javascript: return confirm('ต้องการลบรายการนี้หรือไม่?');"/>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>--%>
                            </Columns>
                            <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                                            FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                                            NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                                            PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                        </MasterTableView>
                        <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                                        GroupContinuedFormatString="" GroupContinuesFormatString="" 
                                                        GroupSplitFormat="" />
                        <ClientSettings EnableRowHoverStyle="True">
                            <Selecting AllowRowSelect="true" />
                            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                        </ClientSettings>
                    </telerik:RadGrid>
                </td>
              
            </tr>

           </table>
              </td>
            </tr>

         
    
        <div class="SumTaxAmount">
         <table  align = "right" >
                <tr align ="right">
                    <td  width="200px">
                       <asp:Label runat="server"  Font-Bold="true" text=" แสดงผลรวมภาษีซื้อ:" />
                    </td>
                    <td  width="200px">
                      <asp:Label ID="lblSumPayment" runat="server"  Font-Bold="true"   />
                    </td>
                </tr>    
              <tr align ="right">
                    <td  width="200px">
                        <asp:Label ID="Label1" runat="server"  Font-Bold="true" text=" แสดงผลรวมภาษีขาย :" /> 
                    </td>      
                     <td width="200px">
                       <asp:Label ID="lblSumRecive" runat="server"  Font-Bold="true"  />
                    </td>
             </tr>
              <tr align ="right">
                    <td  width="200px">
                         <asp:Label ID="Label2" runat="server"  Font-Bold="true" text=" ผลรวมภาษีซื้อ-ผลรวมภาษีขาย :" /> 
                    </td>      
                     <td width="200px">
                      <asp:Label ID="lblSumRecive_lblSumPayment" runat="server"  Font-Bold="true" /> 
                    </td>
             </tr>
             <tr align ="right">
                    <td  width="200px">
                       <asp:Label ID="sum" runat="server"  Font-Bold="true" text=" รวม :" /> 
                        
                    </td>      
                     <td width="200px">
                       <asp:Label ID="SumAmount" runat="server"  Font-Bold="true"  />
                    </td>
             </tr>
             

            </table>
           
               
         </div>

       
         
    </table>     
    
 
           
                     <div align="center" class="DivInfo">
                            <asp:LinkButton ID="btnSave" runat="server" CausesValidation="true" CssClass="LinkButton" onclick="btnSave_Click">บันทึกบัญชี
            </asp:LinkButton>
                        </div>  
             
          
    </asp:Panel>
      
 
 </asp:Content>


                
                  
            
            
                    
                 
                    
                
      <%--        
            
       --%>
